Integrand size = 21, antiderivative size = 138 \[ \int \frac {\sin (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=-\frac {15 \sqrt {b} \arctan \left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b}}\right )}{8 (a-b)^{7/2} f}-\frac {15 \cos (e+f x)}{8 (a-b)^3 f}+\frac {\cos (e+f x)}{4 (a-b) f \left (a-b+b \sec ^2(e+f x)\right )^2}+\frac {5 \cos (e+f x)}{8 (a-b)^2 f \left (a-b+b \sec ^2(e+f x)\right )} \]
[Out]
Time = 0.13 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3745, 296, 331, 211} \[ \int \frac {\sin (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=-\frac {15 \sqrt {b} \arctan \left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b}}\right )}{8 f (a-b)^{7/2}}-\frac {15 \cos (e+f x)}{8 f (a-b)^3}+\frac {5 \cos (e+f x)}{8 f (a-b)^2 \left (a+b \sec ^2(e+f x)-b\right )}+\frac {\cos (e+f x)}{4 f (a-b) \left (a+b \sec ^2(e+f x)-b\right )^2} \]
[In]
[Out]
Rule 211
Rule 296
Rule 331
Rule 3745
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {1}{x^2 \left (a-b+b x^2\right )^3} \, dx,x,\sec (e+f x)\right )}{f} \\ & = \frac {\cos (e+f x)}{4 (a-b) f \left (a-b+b \sec ^2(e+f x)\right )^2}+\frac {5 \text {Subst}\left (\int \frac {1}{x^2 \left (a-b+b x^2\right )^2} \, dx,x,\sec (e+f x)\right )}{4 (a-b) f} \\ & = \frac {\cos (e+f x)}{4 (a-b) f \left (a-b+b \sec ^2(e+f x)\right )^2}+\frac {5 \cos (e+f x)}{8 (a-b)^2 f \left (a-b+b \sec ^2(e+f x)\right )}+\frac {15 \text {Subst}\left (\int \frac {1}{x^2 \left (a-b+b x^2\right )} \, dx,x,\sec (e+f x)\right )}{8 (a-b)^2 f} \\ & = -\frac {15 \cos (e+f x)}{8 (a-b)^3 f}+\frac {\cos (e+f x)}{4 (a-b) f \left (a-b+b \sec ^2(e+f x)\right )^2}+\frac {5 \cos (e+f x)}{8 (a-b)^2 f \left (a-b+b \sec ^2(e+f x)\right )}-\frac {(15 b) \text {Subst}\left (\int \frac {1}{a-b+b x^2} \, dx,x,\sec (e+f x)\right )}{8 (a-b)^3 f} \\ & = -\frac {15 \sqrt {b} \arctan \left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b}}\right )}{8 (a-b)^{7/2} f}-\frac {15 \cos (e+f x)}{8 (a-b)^3 f}+\frac {\cos (e+f x)}{4 (a-b) f \left (a-b+b \sec ^2(e+f x)\right )^2}+\frac {5 \cos (e+f x)}{8 (a-b)^2 f \left (a-b+b \sec ^2(e+f x)\right )} \\ \end{align*}
Time = 2.30 (sec) , antiderivative size = 170, normalized size of antiderivative = 1.23 \[ \int \frac {\sin (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\frac {\frac {15 \sqrt {b} \arctan \left (\frac {\sqrt {a-b}-\sqrt {a} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right )}{(a-b)^{7/2}}+\frac {15 \sqrt {b} \arctan \left (\frac {\sqrt {a-b}+\sqrt {a} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right )}{(a-b)^{7/2}}+\frac {2 \cos (e+f x) \left (-4+\frac {4 b^2}{(a+b+(a-b) \cos (2 (e+f x)))^2}-\frac {9 b}{a+b+(a-b) \cos (2 (e+f x))}\right )}{(a-b)^3}}{8 f} \]
[In]
[Out]
Time = 5.46 (sec) , antiderivative size = 132, normalized size of antiderivative = 0.96
method | result | size |
derivativedivides | \(\frac {-\frac {\cos \left (f x +e \right )}{a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}}+\frac {b \left (\frac {\left (-\frac {9 a}{8}+\frac {9 b}{8}\right ) \cos \left (f x +e \right )^{3}-\frac {7 b \cos \left (f x +e \right )}{8}}{\left (a \cos \left (f x +e \right )^{2}-b \cos \left (f x +e \right )^{2}+b \right )^{2}}+\frac {15 \arctan \left (\frac {\left (a -b \right ) \cos \left (f x +e \right )}{\sqrt {b \left (a -b \right )}}\right )}{8 \sqrt {b \left (a -b \right )}}\right )}{\left (a -b \right )^{3}}}{f}\) | \(132\) |
default | \(\frac {-\frac {\cos \left (f x +e \right )}{a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}}+\frac {b \left (\frac {\left (-\frac {9 a}{8}+\frac {9 b}{8}\right ) \cos \left (f x +e \right )^{3}-\frac {7 b \cos \left (f x +e \right )}{8}}{\left (a \cos \left (f x +e \right )^{2}-b \cos \left (f x +e \right )^{2}+b \right )^{2}}+\frac {15 \arctan \left (\frac {\left (a -b \right ) \cos \left (f x +e \right )}{\sqrt {b \left (a -b \right )}}\right )}{8 \sqrt {b \left (a -b \right )}}\right )}{\left (a -b \right )^{3}}}{f}\) | \(132\) |
risch | \(-\frac {{\mathrm e}^{i \left (f x +e \right )}}{2 \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right ) f}-\frac {{\mathrm e}^{-i \left (f x +e \right )}}{2 \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right ) f}-\frac {b \left (-9 a \,{\mathrm e}^{7 i \left (f x +e \right )}+9 b \,{\mathrm e}^{7 i \left (f x +e \right )}-27 a \,{\mathrm e}^{5 i \left (f x +e \right )}-b \,{\mathrm e}^{5 i \left (f x +e \right )}-27 a \,{\mathrm e}^{3 i \left (f x +e \right )}-b \,{\mathrm e}^{3 i \left (f x +e \right )}-9 a \,{\mathrm e}^{i \left (f x +e \right )}+9 b \,{\mathrm e}^{i \left (f x +e \right )}\right )}{4 \left (-a +b \right )^{3} \left (-a \,{\mathrm e}^{4 i \left (f x +e \right )}+b \,{\mathrm e}^{4 i \left (f x +e \right )}-2 a \,{\mathrm e}^{2 i \left (f x +e \right )}-2 b \,{\mathrm e}^{2 i \left (f x +e \right )}-a +b \right )^{2} f}-\frac {15 i \sqrt {b \left (a -b \right )}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {b \left (a -b \right )}\, {\mathrm e}^{i \left (f x +e \right )}}{a -b}+1\right )}{16 \left (a -b \right )^{4} f}+\frac {15 i \sqrt {b \left (a -b \right )}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {b \left (a -b \right )}\, {\mathrm e}^{i \left (f x +e \right )}}{a -b}+1\right )}{16 \left (a -b \right )^{4} f}\) | \(364\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 259 vs. \(2 (122) = 244\).
Time = 0.36 (sec) , antiderivative size = 556, normalized size of antiderivative = 4.03 \[ \int \frac {\sin (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\left [-\frac {16 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{5} + 50 \, {\left (a b - b^{2}\right )} \cos \left (f x + e\right )^{3} + 30 \, b^{2} \cos \left (f x + e\right ) + 15 \, {\left ({\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{4} + 2 \, {\left (a b - b^{2}\right )} \cos \left (f x + e\right )^{2} + b^{2}\right )} \sqrt {-\frac {b}{a - b}} \log \left (-\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} - 2 \, {\left (a - b\right )} \sqrt {-\frac {b}{a - b}} \cos \left (f x + e\right ) - b}{{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}\right )}{16 \, {\left ({\left (a^{5} - 5 \, a^{4} b + 10 \, a^{3} b^{2} - 10 \, a^{2} b^{3} + 5 \, a b^{4} - b^{5}\right )} f \cos \left (f x + e\right )^{4} + 2 \, {\left (a^{4} b - 4 \, a^{3} b^{2} + 6 \, a^{2} b^{3} - 4 \, a b^{4} + b^{5}\right )} f \cos \left (f x + e\right )^{2} + {\left (a^{3} b^{2} - 3 \, a^{2} b^{3} + 3 \, a b^{4} - b^{5}\right )} f\right )}}, -\frac {8 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{5} + 25 \, {\left (a b - b^{2}\right )} \cos \left (f x + e\right )^{3} + 15 \, b^{2} \cos \left (f x + e\right ) + 15 \, {\left ({\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (f x + e\right )^{4} + 2 \, {\left (a b - b^{2}\right )} \cos \left (f x + e\right )^{2} + b^{2}\right )} \sqrt {\frac {b}{a - b}} \arctan \left (-\frac {{\left (a - b\right )} \sqrt {\frac {b}{a - b}} \cos \left (f x + e\right )}{b}\right )}{8 \, {\left ({\left (a^{5} - 5 \, a^{4} b + 10 \, a^{3} b^{2} - 10 \, a^{2} b^{3} + 5 \, a b^{4} - b^{5}\right )} f \cos \left (f x + e\right )^{4} + 2 \, {\left (a^{4} b - 4 \, a^{3} b^{2} + 6 \, a^{2} b^{3} - 4 \, a b^{4} + b^{5}\right )} f \cos \left (f x + e\right )^{2} + {\left (a^{3} b^{2} - 3 \, a^{2} b^{3} + 3 \, a b^{4} - b^{5}\right )} f\right )}}\right ] \]
[In]
[Out]
Timed out. \[ \int \frac {\sin (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\text {Timed out} \]
[In]
[Out]
Exception generated. \[ \int \frac {\sin (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
none
Time = 0.99 (sec) , antiderivative size = 215, normalized size of antiderivative = 1.56 \[ \int \frac {\sin (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=-\frac {f^{5} \cos \left (f x + e\right )}{a^{3} f^{6} - 3 \, a^{2} b f^{6} + 3 \, a b^{2} f^{6} - b^{3} f^{6}} + \frac {15 \, b \arctan \left (\frac {a \cos \left (f x + e\right ) - b \cos \left (f x + e\right )}{\sqrt {a b - b^{2}}}\right )}{8 \, {\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} \sqrt {a b - b^{2}} f} - \frac {\frac {9 \, a b \cos \left (f x + e\right )^{3}}{f} - \frac {9 \, b^{2} \cos \left (f x + e\right )^{3}}{f} + \frac {7 \, b^{2} \cos \left (f x + e\right )}{f}}{8 \, {\left (a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} {\left (a \cos \left (f x + e\right )^{2} - b \cos \left (f x + e\right )^{2} + b\right )}^{2}} \]
[In]
[Out]
Time = 14.01 (sec) , antiderivative size = 780, normalized size of antiderivative = 5.65 \[ \int \frac {\sin (e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx=-\frac {\frac {8\,a^2+9\,a\,b-2\,b^2}{4\,\left (a-b\right )\,\left (a^2-2\,a\,b+b^2\right )}-\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\left (16\,a^4-41\,a^3\,b+27\,a^2\,b^2-40\,a\,b^3+8\,b^4\right )}{2\,a^2\,\left (a-b\right )\,\left (a^2-2\,a\,b+b^2\right )}+\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (24\,a^4-64\,a^3\,b+53\,a^2\,b^2+40\,a\,b^3-8\,b^4\right )}{2\,a^2\,\left (a-b\right )\,\left (a^2-2\,a\,b+b^2\right )}+\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8\,\left (8\,a^3-9\,a^2\,b+24\,a\,b^2-8\,b^3\right )}{4\,a\,\left (a-b\right )\,\left (a^2-2\,a\,b+b^2\right )}+\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (-16\,a^3+23\,a^2\,b+27\,a\,b^2-4\,b^3\right )}{2\,a\,\left (a-b\right )\,\left (a^2-2\,a\,b+b^2\right )}}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (8\,a\,b-3\,a^2\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8\,\left (8\,a\,b-3\,a^2\right )+a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{10}+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (2\,a^2-8\,a\,b+16\,b^2\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\left (2\,a^2-8\,a\,b+16\,b^2\right )+a^2\right )}-\frac {15\,\sqrt {b}\,\mathrm {atan}\left (\frac {{\left (a-b\right )}^7\,\left (2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (\frac {\sqrt {b}\,\left (225\,a^8\,b-1350\,a^7\,b^2+3375\,a^6\,b^3-4500\,a^5\,b^4+3375\,a^4\,b^5-1350\,a^3\,b^6+225\,a^2\,b^7\right )}{a\,{\left (a-b\right )}^{13/2}}+\frac {225\,\sqrt {b}\,\left (a-2\,b\right )\,\left (128\,a^{12}-1408\,a^{11}\,b+6912\,a^{10}\,b^2-19968\,a^9\,b^3+37632\,a^8\,b^4-48384\,a^7\,b^5+43008\,a^6\,b^6-26112\,a^5\,b^7+10368\,a^4\,b^8-2432\,a^3\,b^9+256\,a^2\,b^{10}\right )}{512\,a\,{\left (a-b\right )}^{21/2}}\right )+\frac {225\,\sqrt {b}\,\left (a-2\,b\right )\,\left (-128\,a^{12}+1152\,a^{11}\,b-4608\,a^{10}\,b^2+10752\,a^9\,b^3-16128\,a^8\,b^4+16128\,a^7\,b^5-10752\,a^6\,b^6+4608\,a^5\,b^7-1152\,a^4\,b^8+128\,a^3\,b^9\right )}{256\,a\,{\left (a-b\right )}^{21/2}}\right )}{225\,a^8\,b-1350\,a^7\,b^2+3375\,a^6\,b^3-4500\,a^5\,b^4+3375\,a^4\,b^5-1350\,a^3\,b^6+225\,a^2\,b^7}\right )}{8\,f\,{\left (a-b\right )}^{7/2}} \]
[In]
[Out]